package com.glorysoft.wangnianxinpda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.glorysoft.wangnianxinpda.adapter.viewholder.DataBindingBaseViewHolder;
import com.glorysoft.wangnianxinpda.databinding.ItemMaterielBinding;
import com.glorysoft.wangnianxinpda.entity.MaterialInfoEntity;

import java.util.List;

public class MaterialAdapter extends BaseQuickAdapter<MaterialInfoEntity, DataBindingBaseViewHolder> {
    public MaterialAdapter(int layoutResId, @Nullable List<MaterialInfoEntity> data) {
        super(layoutResId, data);
    }

//    public void setmList(List<MaterialInfoEntity> mList) {
//        this.mList = mList;
//        notifyDataSetChanged();
//    }

    @Override
    protected void convert(DataBindingBaseViewHolder helper, MaterialInfoEntity item) {
        ItemMaterielBinding binding = (ItemMaterielBinding) helper.getDataBinding();
        binding.setProductBean(item);
        binding.executePendingBindings();
    }


}
